package Model;
/**
 *
 * @author Selemani
 */

/*
 * Point class represents desired camera position in given time
 * @implements Comparable<Point>
 */
public class Point implements Comparable<Point>{
    private int pointId = 0;
    private String alias = "";
    private int timeFromStart;
    /*
     * Camera object point is created for
     */
    private Camera camera = null;
    private int posX;
    private int posY;
    private int posZ;
    private int tiltPos;
    private int slidePos;
    private int cranePosX;
    private int cranePosY;

    /**
     * Empty construtor
     */
    public Point() { }

    /**
     * Set & Get methods
     * 
     */
    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public Camera getCamera() {
        return camera;
    }

    public void setCamera(Camera camera) {
        this.camera = camera;
    }

    public int getCranePosX() {
        return cranePosX;
    }

    public void setCranePosX(int cranePosX) {
        this.cranePosX = cranePosX;
    }

    public int getCranePosY() {
        return cranePosY;
    }

    public void setCranePosY(int cranePosY) {
        this.cranePosY = cranePosY;
    }

    public int getPointId() {
        return pointId;
    }

    public void setPointId(int pointId) {
        this.pointId = pointId;
    }

    public int getPosX() {
        return posX;
    }

    public void setPosX(int posX) {
        this.posX = posX;
    }

    public int getPosY() {
        return posY;
    }

    public void setPosY(int posY) {
        this.posY = posY;
    }

    public int getPosZ() {
        return posZ;
    }

    public void setPosZ(int posZ) {
        this.posZ = posZ;
    }

    public int getSlidePos() {
        return slidePos;
    }

    public void setSlidePos(int slidePos) {
        this.slidePos = slidePos;
    }

    public int getTiltPos() {
        return tiltPos;
    }

    public void setTiltPos(int tiltPos) {
        this.tiltPos = tiltPos;
    }

    public int getTimeFromStart() {
        return timeFromStart;
    }

    public void setTimeFromStart(int timeFromStart) {
        this.timeFromStart = timeFromStart;
    }

    /*
     * Points can be sorted by timeFromStart attribute
     */
    @Override
    public int compareTo(Point o) {
        if(o.timeFromStart < timeFromStart){
            return 1;
        }else if(o.timeFromStart > timeFromStart){
            return -1;
        }
        return 0;
    }
}
